<?php

namespace app\api\controller;

use app\api\model\ManystoreShop;
use app\common\controller\Api;

class Shop extends Api
{
    protected $noNeedLogin = ['ListData'];
    protected $noNeedRight = ['*'];

    public function ListData()
    {
        $param= $this->request->param();
        $ManystoreShop = new ManystoreShop();
        if(!empty($param['type'])){
            $where['type'] = $param['type'];
        }
        $where['status'] = '1';
        $list= $ManystoreShop->where($where)->field('id,name,logo,address_city,address,address_detail,longitude,latitude,tel')->paginate();
        $this->success('',$list);
    }
}
